package com.lzy.entity;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Id;

import com.lzy.util.IpConverter;

/**
 * 
 * @author pwz 
 * IM记录 
 */
//@Entity
//@Table(name="TBIM")
public class IM implements Serializable{

	private static final long serialVersionUID = 1L;
	
	// ID
//	private int id ;
	
	// 地区编号
	@Id private int UpAreaid ;
	// 数据源
	@Id private int Datasource ;
	// 场所编号
	@Id private int SiteId ;
	// IM类型
	@Id private int IMtype ;
	// 捕获时间
	private Date CaptureTime ;
	// 版本号
	private String version ;
	// 源ip
	private long SrcIP ;
	// 宿ip
	private long DestIP ;
	// 源端口
	private int SrcPort ;
	// 宿端口
	private int DestPort ;
	// 源radius
	private String SrcRadius ;
	// 宿radius
	private String DestRadius ;
	// 源mac
	private String SrcMac ;
	// LogName
	private String LogName;
	// 类型
	private int Type ;
	// 发送账号
	private String SrcID ;
	// 接收账号
	private String DestID ;
	// 内容
	private String Content ;
	
	// 保留字段
	@Column(name="A1",nullable=true)
	private String A1 ;
	@Column(name="A2",nullable=true)
	private String A2 ;
	@Column(name="A3",nullable=true)
	private String A3 ;
	
	// ID
//	@Id
//	@GeneratedValue(strategy=GenerationType.IDENTITY)
//	@Column(name="id")
//	public int getId() {
//		return id;
//	}
//	public void setId(int id) {
//		this.id = id;
//	}
	public int getUpAreaid() {
		return this.UpAreaid;
	}
	public void setUpAreaid(int upAreaid) {
		this.UpAreaid = upAreaid;
	}
	
	public int getDatasource() {
		return this.Datasource;
	}
	public void setDatasource(int datasource) {
		this.Datasource = datasource;
	}
	
	public int getSiteId() {
		return SiteId;
	}
	public void setSiteId(int siteId) {
		this.SiteId = siteId;
	}
	
	public int getIMtype() {
		return IMtype;
	}
	public void setIMtype(int iMtype) {
		this.IMtype = iMtype;
	}
	
	public String getCaptureTime() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String capture = sdf.format(CaptureTime);
		return capture;
	}
	public void setCaptureTime(Date captureTime) {
		this.CaptureTime = captureTime;
	}
	
	public String getVersion() {
		return version;
	}
	public void setVersion(String version) {
		this.version = version;
	}
	
	public String getSrcIP() {
		return IpConverter.longToIP(SrcIP) ;
	}
	public void setSrcIP(long srcIP) {
		this.SrcIP = srcIP;
	}
	
	public String getDestIP() {
		return IpConverter.longToIP(DestIP);
	}
	public void setDestIP(long destIP) {
		this.DestIP = destIP;
	}
	
	public int getSrcPort() {
		return SrcPort;
	}
	public void setSrcPort(int srcPort) {
		this.SrcPort = srcPort;
	}
	
	public int getDestPort() {
		return DestPort;
	}
	public void setDestPort(int destPort) {
		this.DestPort = destPort;
	}
	
	public String getSrcRadius() {
		return SrcRadius;
	}
	public void setSrcRadius(String srcRadius) {
		this.SrcRadius = srcRadius;
	}
	
	public String getDestRadius() {
		return DestRadius;
	}
	public void setDestRadius(String destRadius) {
		this.DestRadius = destRadius;
	}
	
	public String getSrcMac() {
		return SrcMac;
	}
	public void setSrcMac(String srcMac) {
		this.SrcMac = srcMac;
	}
	
	public String getLogName() {
		return LogName;
	}
	public void setLogName(String logName) {
		this.LogName = logName;
	}
	
	public int getType() {
		return Type;
	}
	public void setType(int type) {
		this.Type = type;
	}
	
	public String getSrcID() {
		return SrcID;
	}
	public void setSrcID(String srcID) {
		this.SrcID = srcID;
	}
	
	public String getDestID() {
		return DestID;
	}
	public void setDestID(String destID) {
		this.DestID = destID;
	}
	
	public String getContent() {
		return Content;
	}
	public void setContent(String content) {
		this.Content = content;
	}
	
	public String getA1() {
		return A1;
	}
	public void setA1(String a1) {
		A1 = a1;
	}
	
	public String getA2() {
		return A2;
	}
	public void setA2(String a2) {
		A2 = a2;
	}
	
	public String getA3() {
		return A3;
	}
	public void setA3(String a3) {
		A3 = a3;
	}

}
